<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录界面</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', sans-serif;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background-image: linear-gradient(to bottom right, #000, #FFC000);
        }

        .login-container {
            background-color: #fff7CD;
            padding: 2rem;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
        }

        .login-title {
            text-align: center;
            color: #333;
            margin-bottom: 2rem;
            font-size: 1.8rem;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: #666;
        }

        .form-group input {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            transition: border-color 0.3s ease;
        }

        .form-group input:focus {
            outline: none;
            border-color: #6ac1c5;
        }

        .login-btn {
            width: 100%;
            padding: 0.8rem;
            background: linear-gradient(45deg, #6ac1c5, #bda5ff);
            border: none;
            border-radius: 5px;
            color: white;
            font-size: 1rem;
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .login-btn:hover {
            transform: translateY(-2px);
        }

        .forgot-password {
            text-align: center;
            margin-top: 1rem;
        }

        .forgot-password a {
            color: #6ac1c5;
            text-decoration: none;
            font-size: 0.9rem;
        }

        .forgot-password a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
<script>
var msg = "${msg}";
if (msg != null&&  msg != '') {
alert(msg);
}
</script>

<div class="login-container">
    <h2 class="login-title">欢迎登录</h2>
    <form  action="/login" method="post">
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" id="username" name="username" placeholder="请输入用户名" required>
        </div>
        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" id="password" name="password" placeholder="请输入密码" required>
        </div>
        <button type="submit" class="login-btn"  >登录</button>
        <div class="forgot-password">

            <a href="register.jsp" >&nbsp;&nbsp;&nbsp;&nbsp;注册！</a>
        </div>
    </form>

</div>
<script src="static/jq/jquery-1.4.4.min.js"></script>
<%--<script>--%>
<%--    function  register(){--%>
<%--        var username = $("#username").val();--%>
<%--        var password = $("#password").val();--%>
<%--        $.ajax({--%>
<%--            url:"/login",--%>
<%--            data:{username:username,password:password},--%>
<%--            dataType:"json",--%>
<%--            success:function (data){--%>
<%--                console.log(data)--%>
<%--            },--%>
<%--            error:function (error){--%>
<%--                console.log(error)--%>
<%--            }--%>
<%--        })--%>
<%--    }--%>
<%--</script>--%>
</body>
</html>